/******************************************************************************
 * Copyright (C) 2016  671643387@qq.com
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 *****************************************************************************/

#ifndef NODE_UTIL_OPTION_H_
#define NODE_UTIL_OPTION_H_

#include <string>
#include <vector>

namespace node {
	namespace util {

	class option
	{
	public:
    	option(const std::string& name, const std::string& short_name, const std::string& description);
    	~option(void);

    	const std::string& get_name(void) const;
    	const std::string& get_short_name(void) const;
    	const std::string& get_description(void) const;
    	const std::string& get_value(void) const;
    	void set_value(const std::string& value);
    	bool is_requried(void) const;
		option& set_required(bool requried);
    	bool has_argument(void) const;
		option& set_has_argument(bool has_argument);
    	bool is_valid(void) const;
    	void set_is_valid(bool valid);

    	bool match_name(std::string& name) const;
    	bool match_short_name(std::string& short_name) const;

  	private:
    	std::string _name;
    	std::string _short_name;
    	std::string _description;
    	std::string _value;
    	bool _required;
    	bool _has_argument;
    	bool _valid;
	};

}}

#endif // NODE_UTIL_OPTION_H_
